package com.yuhanginfo.modules.web.entity;

import org.hibernate.validator.constraints.Length;

import com.yuhanginfo.common.persistence.WebDataEntity;

/**
 * 短信验证码Entity
 * @author yinhao
 * @version 2017-11-07
 */
public class WebSms extends WebDataEntity<WebSms> {
	
	private static final long serialVersionUID = 1L;
	private String phone;		// 手机号
	private String code;		// 验证码
	
	public WebSms() {
		super();
	}

	public WebSms(String id){
		super(id);
	}

	@Length(min=0, max=13, message="手机号长度必须介于 0 和 13 之间")
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	@Length(min=0, max=10, message="验证码长度必须介于 0 和 10 之间")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
}